//2009/07/15 19:37:45
#include<iostream>
#include<string>
#include<vector>
using namespace std;

class SoccerLeagues
{
	public:
	vector <int> points(vector <string> matches)
	{
		vector<int> score(matches.size(), 0);
		for(int i=0; i< matches.size();i++)
		{
			for(int j=0; j<matches.size(); j++)
			{
				if(i==j) continue;
				if(matches[i][j] == 'W')
				{
					score[i]+=3;
				}
				else if(matches[i][j] == 'D')
				{
					score[i]+=1;
					score[j]+=1;
				}
				else
				{
					score[j]+=3;
				}
			}
		}
		return score;
	}
};
